home *** CD-ROM | disk | FTP | other *** search
- assume cs:bios
- bios segment para public 'CODE'
-
- public _setfs
- _setfs proc near
- mov ax,4[esp]
- mov fs,ax
- ret
- _setfs endp
-
- public _getpallet
- _getpallet proc near
- push edx
- mov edx,8[esp]
- mov ax,0110H
- push fs
- mov fs,ax
- mov ax,0501H
- call pword ptr fs:[01c0H]
- pop fs
- pop edx
- ret
- _getpallet endp
-
- public _mousepos
- _mousepos proc near
- push ebx
- push ecx
- push edx
- push fs
- mov ax,0110H ; tbios selector
- mov fs,ax
- mov ah,3 ; get mouse button & pos
- call pword ptr fs:[40H] ; mouse BIOS
- pop fs
- mov eax,16[esp]
- mov [eax],dx ; x
- mov eax,20[esp]
- mov [eax],bx ; y
- pop edx
- pop ecx
- pop ebx
- ret
- _mousepos endp
-
- public _putfs
- _putfs proc near
- push ebx
- mov eax,8[esp]
- mov ebx,12[esp]
- mov fs:[eax],ebx
- pop ebx
- ret
- _putfs endp
-
- public _getfs
- _getfs proc near
- mov eax,4[esp]
- mov eax,fs:[eax]
- ret
- _getfs endp
-
- bios ends
- end
-